<div class="easyui-tabs" data-options="border:'0'"
	id="user-userlist-edit">
	<div title="Tab1">
		<form method="post" action="backend/saveLoan.json">
			<input type="hidden" name="lid" value="${loanInfo.lid}"/>
			<table>
			    <tr>
			        <td>贷款标题:<input class="easyui-textbox" 
			        type="text" name="title" data-options="required:true" value="${loanInfo.title}"></input></td>
			        <td>贷款人id:<input class="easyui-textbox" 
			        type="text" name="uid" data-options="required:true" value="${loanInfo.uid}"></input></td>
			    </tr>
			    <tr>
			        <td>贷款金额:<input class="easyui-textbox" 
			        type="text" name="amount.cent" data-options="required:true" value="${loanInfo.amount.cent}"></input></td>
			        <td>标类型 <select name="type" value="${loanInfo.type}">
							  <option value ="001">普通标</option>
							  <option value ="002">流转标</option>
							</select>

					</td>
			    </tr>
			    <tr>
			        <td>管理费率:<input class="easyui-textbox" 
			        type="text" name="mfeeRate" value="${loanInfo.mfeeRate}" data-options="required:true"></input></td>
			        <td>服务费率:<input class="easyui-textbox" 
			        type="text" name="feeRate" value="${loanInfo.feeRate}" data-options="required:true"></input></td>
			    </tr>
			    <tr>
			        <td>实地考察费:<input class="easyui-textbox" 
			        type="text" name="fieldFee.cent" value="${loanInfo.fieldFee.cent}"></input></td>
			        <td>征信代查费:<input class="easyui-textbox" 
			        type="text" name="creditFee.cent" value="${loanInfo.creditFee.cent}"></td>
			    </tr>
			    <tr>
			        <td>最小投标额:<input class="easyui-textbox" 
			        type="text" name="tenderMin.cent" value="${loanInfo.tenderMin.cent}"></td>
			        <td>最大投标额:<input class="easyui-textbox" 
			        type="text" name="tenderMax.cent" value="${loanInfo.tenderMax.cent}"></input></td>
			    </tr>
			    <tr>
			        <td>贷款年利率:<input class="easyui-textbox" 
			        type="text" name="apr" data-options="required:true" value="${loanInfo.apr}"></input></td>
			        <td>奖励年利率:<input class="easyui-textbox" 
			        type="text" name="rewardApr" value="${loanInfo.rewardApr}"></td>
			    </tr>
			    <tr>
			        <td>贷款期限:<input class="easyui-textbox" 
			        type="text" name="deadline" data-options="required:true" value="${loanInfo.deadline}"></td>
			        <td>期限类型:<select name="deadlineType">
							  <option value ="m">月</option>
							  <option value ="y">年</option>
							  <option value ="d">天</option>
							  <option value ="h">时</option>
							</select></td>
			    </tr>
			    <tr>
			        <td>还款方式:<select name="repayMethod" value="${loanInfo.repayMethod}">
						  <option value ="001">按月分期</option>
						  <option value ="002">到期还本息</option>
						</select></td>
			        <td>状态:<select id="status" name="status" disabled="disabled">
						  <option value = 1>草稿</option>
						  <option value = 2>无效</option>
						  <option value = 3>审核失败</option>
						  <option value = 11>待审核</option>
						  <option value = 12>待发布</option>
						  <option value = 21>招标中</option>
						  <option value = 31>已流标</option>
						  <option value = 32>满标待审</option>
						  <option value = 41>还款中</option>
						  <option value = 51>还款成功</option>
						</select></td>
						<input id="input_status" type="hidden" value="${loanInfo.status}"></input>
			    </tr>
			    <tr>
			    	<td>招标开始时间:<input class="easyui-datebox" name="tendBeginTime" 
			    	value="${loanInfo.tenderBegin?number_to_datetime}"
			    	 style="width:120px"></input></td>
			    	<td>贷款过期时间:<input class="easyui-datebox" name="tendEndTime" 
			    	value="${loanInfo.exptime?number_to_datetime}" style="width:120px" /></td>
			    </tr>
			    <tr>
			    	<td>流转债权人真实姓名:<input class="easyui-textbox" 
			        type="text" name="lrealname" value="${loanInfo.lrealname}"></input></td>
			    	<td>流转债权人身份证号:<input class="easyui-textbox" 
			        type="text" name="lidcard" value="${loanInfo.lidcard}"></input></td>
			    </tr>
			    <tr>
			    	<td>流转借款合同编号:<input class="easyui-textbox" 
			        type="text" name="lno" value="${loanInfo.lno}"></input></td>
			        <td>其它服务费:<input class="easyui-textbox" 
			        type="text" name="otherFee.cent" value="${loanInfo.otherFee.cent}"></input></td>
			    </tr>
			    <tr>
			    	<td>贷款用途:<select name="useType" value="${loanInfo.useType}">
						  <option value ="001">买房</option>
						  <option value ="002">资金周转</option>
						</select></td>
			    </tr>
			    <tr>
			        <td>是否流转标:<input id="isFlow" type="checkbox" checked="checked"  />
			        <input id="input_isFlow" type="hidden" name="isFlow" value="${loanInfo.isFlow}"></td>
			        <td>是否为实地认证:<input id="isField" type="checkbox" checked="checked"/>
			        <input id="input_isField" type="hidden" name="isField" value="${loanInfo.isField}"></td>
			    </tr>
			    <tr>
			        <td>是否自动放款:<input id="isOkout" type="checkbox" checked="checked"/>
			        <input id="input_isOkout" type="hidden" name="isOkout" value="${loanInfo.isOkout}"></td>
			        <td>是否为新手专享:<input id="isNewbie" type="checkbox" checked="checked"/>
			        <input id="input_isNewbie" type="hidden" name="isNewbie" value="${loanInfo.isNewbie}"></td>
			    </tr>
			    <tr>
			        <td>是否保障计划:<input id="isPlan" type="checkbox" checked="checked" />
			        <input id="input_isPlan" type="hidden" name="isPlan" value="${loanInfo.isPlan}"></td>
			        <td>无需验证码:<input id="noCaptcha" type="checkbox" checked="checked" >
			        <input id="input_noCaptcha" type="hidden" name="noCaptcha" value="${loanInfo.noCaptcha}"></td>
			    </tr>
			    <tr>
			        <td>贷款描述:<textarea cols="20" rows="3" id="contactus" name="description" value="${loanInfo.description}">${loanInfo.description}</textarea></td>
			        <td>贷款备注:<textarea cols="20" rows="3" id="contactus" name="remark" value="${loanInfo.remark}">${loanInfo.remark}</textarea></td>
			    </tr>
			</table>
		</form>
	</div>
	</div>
	
	<script type="text/javascript">
		var base = loli.static.url.base;
		$(function() {
			$("#status").val($("#input_status").val());
			
			if($("#input_isFlow").val() == 1){
				$("#isFlow").attr("checked",true);
			}else{
				$("#isFlow").attr("checked",false);
			}
			if($("#input_isField").val() == 1){
				$("#isField").attr("checked",true);
			}else{
				$("#isField").attr("checked",false);
			}
			if($("#input_isOkout").val() == 1){
				$("#isOkout").attr("checked",true);
			}else{
				$("#isOkout").attr("checked",false);
			}
			if($("#input_isNewbie").val() == 1){
				$("#isNewbie").attr("checked",true);
			}else{
				$("#isNewbie").attr("checked",false);
			}
			if($("#input_isPlan").val() == 1){
				$("#isPlan").attr("checked",true);
			}else{
				$("#isPlan").attr("checked",false);
			}
			if($("#input_noCaptcha").val() == 1){
				$("#noCaptcha").attr("checked",true);
			}else{
				$("#noCaptcha").attr("checked",false);
			}
			
			
			$("#isFlow").bind("click",function(){
			
				if($("#input_isFlow").val()=="0"){
					$("#input_isFlow").val(1);
				}else {
					$("#input_isFlow").val(0);
				}
			});
			$("#isField").bind("click",function(){
				if($("#input_isField").val() == "0"){
					$("#input_isField").val(1);
				}else{
					$("#input_isField").val(0);
				}
			});
			$("#isOkout").bind("click",function(){
				if($("#input_isOkout").val() == "0"){
					$("#input_isOkout").val(1);
				}else{
					$("#input_isOkout").val(0);
				}
			});
			$("#isNewbie").bind("click",function(){
				if($("#input_isNewbie").val() == "0"){
					$("#input_isNewbie").val(1);
				}else{
					$("#input_isNewbie").val(0);
				}
			});
			$("#isPlan").bind("click",function(){
				if($("#input_isPlan").val() == "0"){
					$("#input_isPlan").val(1);
				}else{
					$("#input_isPlan").val(0);
				}
			});
			$("#noCaptcha").bind("click",function(){
				if($("#input_noCaptcha").val() == "0"){
					$("#input_noCaptcha").val(1);
				}else{
					$("#input_noCaptcha").val(0);
				}
			});
			
		});
	</script>